﻿using System;
using System.Xml.Linq;
using System.Diagnostics;

namespace CodeCounsel.SharePoint.RibbonDesigner.Model
{
    [XName("Button", Namespaces.CommandUIText)]
    public class Button
        : Control
    {
        public string LabelText
        {
            get { return DataModel.GetAttributeValue(Schema.LabelText); }
            set { DataModel.SetAttributeValue(Schema.LabelText, value); }
        }

        public string Image16by16
        {
            get { return DataModel.GetAttributeValue(Schema.Image16by16); }
            set { DataModel.SetAttributeValue(Schema.Image16by16, value); }
        }

        public string Image32by32
        {
            get { return DataModel.GetAttributeValue(Schema.Image32by32); }
            set { DataModel.SetAttributeValue(Schema.Image32by32, value); }
        }

        public int Image16by16Top
        {
            get { return DataModel.GetAttributeValue<int>(Schema.Image16by16Top); }
            set { DataModel.SetAttributeValue<int>(Schema.Image16by16Top, value); }
        }

        public int Image32by32Top
        {
            get { return DataModel.GetAttributeValue<int>(Schema.Image32by32Top); }
            set { DataModel.SetAttributeValue<int>(Schema.Image32by32Top, value); }
        }

        public int Image16by16Left
        {
            get { return DataModel.GetAttributeValue<int>(Schema.Image16by16Left); }
            set { DataModel.SetAttributeValue<int>(Schema.Image16by16Left, value); }
        }

        public int Image32by32Left
        {
            get { return DataModel.GetAttributeValue<int>(Schema.Image32by32Left); }
            set { DataModel.SetAttributeValue<int>(Schema.Image32by32Left, value); }
        }

        public Button(XElement dataModel, DomainModelSource source)
            : base(dataModel, source)
        {
        }

        public Button()
        {
        }
    }
}